'use strict';
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    PixelRatio,
    Text,
    View,
	Image,
	TouchableWithoutFeedback,
	Platform
} from 'react-native';
//公共组件
import css from '../../../common/common_css'
import dp from '../../../common/pxToDp'
//页面组件
import MessageCenter from '../../../containers/MessageCenter'
class Search extends Component{
    constructor(props) {
      	super(props);
      	this.state = {

      	};
    }
	//跳转到消息中心
	goToMsg(){
		const {navigator}=this.props.navigator;
		if(navigator){
			navigator.push({
				name:'MessageCenter',
				component:MessageCenter
			})
		}
	}
    render(){
		var iosdiv=null;
		if (Platform.OS === 'ios') {
			iosdiv=(
				<View style={{height:dp(20)}}></View>
			)
		}
		return(
			<View style={[s.windowWidth]}>
				{iosdiv}
				<View style={[s.height54,s.header,s.flexRow]}>
					<View style={[s.width54,s.height54,s.center]}>
						<TouchableWithoutFeedback
							onPress={this.goToMsg.bind(this)}
							>
							<Image
		                        source={require('../../../image/search_bar/bt_com_navigation_notice_default.png')}
								style={[s.width30,s.height30]}
								resizeMode="contain"

							></Image>
						</TouchableWithoutFeedback>
					</View>
					<View style={[s.flex1,s.height54,s.center]}>
						<Image
	                        source={require('../../../image/search_bar/bt_com_navigation_logo.png')}
							style={[s.width250,s.height40]}
							resizeMode="contain"
						></Image>
					</View>
					<View style={[s.width54,s.height54,s.center]}>
						<Image
	                        source={require('../../../image/search_bar/ic_searchbox_search.png')}
							style={[s.width20,s.height20]}
							resizeMode="contain"
						></Image>
					</View>
				</View>
			</View>
		)
    }
}

const s = StyleSheet.create(Object.assign(css,{
	header:{
		backgroundColor:'#fff'
	},
	leftRightIcon:{

	}
}));

module.exports=Search;
